import request from '../request.js'


// 登入
export function login(data) {
  return request.request({
      url: `api/index/sign_in`,
      method: 'POST',
      data: data
  })
}
// 获取首页数据
export function gethomepagedata(data) {
  return request.request({
      url: `api/index/index`,
      method: 'POST',
      data: data
  })
}

// 个人中心
export function getpersonalcenter(data) {
  return request.request({
      url: `api/userhand/get_personal_center`,
      method: 'POST',
      data: data
  })
}
// 商品分类
export function getclassification(data) {
  return request.request({
      url: `api/index/get_classification`,
      method: 'POST',
      data: data
  })
}


// 订单详情
export function getcommodityinfo(data) {
  return request.request({
      url: `api/index/get_commodity_info`,
      method: 'POST',
      data: data
  })
}

// 添加地址
export function changeaddress(data) {
  return request.request({
      url: `api/userhand/change_address`,
      method: 'POST',
      data: data
  })
}

// 地址列表
export function getaddresslist(data) {
  return request.request({
      url: `api/userhand/get_address_list`,
      method: 'POST',
      data: data
  })
}


// 设置地址为默认地址
export function setaddressdefault(data) {
  return request.request({
      url: `api/userhand/set_address_default`,
      method: 'POST',
      data: data
  })
}

// 删除地址
export function deleteaddress(data) {
  return request.request({
      url: `api/userhand/delete_address`,
      method: 'POST',
      data: data
  })
}

// 订单规格
export function getcommoditynum(data) {
  return request.request({
      url: `api/index/get_commodity_num`,
      method: 'POST',
      data: data
  })
}



// 地址详情
export function getaddressinfo(data) {
  return request.request({
      url: `api/userhand/get_address_info`,
      method: 'POST',
      data: data
  })
}

// 优惠券列表
export function getusercoupons(data) {
  return request.request({
      url: `api/userhand/get_user_coupons`,
      method: 'POST',
      data: data
  })
}

// 添加购物车
export function addshopingcart(data) {
  return request.request({
      url: `api/commodityhanld/add_shoping_cart`,
      method: 'POST',
      data: data
  })
}

// 购物车列表
export function getshopingcartlist(data) {
  return request.request({
      url: `api/commodityhanld/get_shoping_cart_list`,
      method: 'POST',
      data: data
  })
}

// 收藏商品和取消收藏
export function changecollection(data) {
  return request.request({
      url: `api/commodityhanld/change_collection`,
      method: 'POST',
      data: data
  })
}


// 商品收藏列表
export function getcollectionlist(data) {
  return request.request({
      url: `api/commodityhanld/get_collection_list`,
      method: 'POST',
      data: data
  })
}

// 删除收藏
export function deletecollection(data) {
  return request.request({
      url: `api/commodityhanld/delete_collection`,
      method: 'POST',
      data: data
  })
}

// 确认订单
export function settlementsubmit(data) {
  return request.request({
      url: `api/commodityhanld/settlement_submit`,
      method: 'POST',
      data: data
  })
}

// 提交订单
export function submitorder(data) {
  return request.request({
      url: `api/orderhand/submit_order`,
      method: 'POST',
      data: data
  })
}

// 我的订单
export function getorderlist(data) {
  return request.request({
      url: `api/orderhand/get_order_list`,
      method: 'POST',
      data: data
  })
}

// 积分订单
export function getintegrallist(data) {
  return request.request({
      url: `api/pointsmall/get_integral_list`,
      method: 'POST',
      data: data
  })
}

// 积分商城
export function getintegralindex(data) {
  return request.request({
      url: `api/index/get_integral_index`,
      method: 'POST',
      data: data
  })
}

// 积分商品详情
export function getintegralinfo(data) {
  return request.request({
      url: `api/index/get_integral_info`,
      method: 'POST',
      data: data
  })
}


// 确认积分订单
export function confirmreceiving(data) {
  return request.request({
      url: `api/pointsmall/confirm_receiving`,
      method: 'POST',
      data: data
  })
}

// 确认兑换商品
export function exchange(data) {
  return request.request({
      url: `api/pointsmall/exchange`,
      method: 'POST',
      data: data
  })
}

// 提交订单
export function exchangesubmit(data) {
  return request.request({
      url: `api/pointsmall/exchange_submit`,
      method: 'POST',
      data: data
  })
}


// 积分订单详情
export function getintegralorderinfo(data) {
  return request.request({
      url: `api/pointsmall/get_integral_order_info`,
      method: 'POST',
      data: data
  })
}



// 订单详情
export function getorderinfo(data) {
  return request.request({
      url: `api/orderhand/get_order_info`,
      method: 'POST',
      data: data
  })
}

// 确认收货
export function confirmreceipt(data) {
  return request.request({
      url: `api/orderhand/confirm_receipt`,
      method: 'POST',
      data: data
  })
}

// 删除订单
export function deleteorder(data) {
  return request.request({
      url: `api/orderhand/delete_order`,
      method: 'POST',
      data: data
  })
}

// 取消订单
export function cancelorder(data) {
  return request.request({
      url: `api/orderhand/cancel_order`,
      method: 'POST',
      data: data
  })
}

// 关于我们
export function getabout(data) {
  return request.request({
      url: `api/index/get_about`,
      method: 'POST',
      data: data
  })
}

// 重新支付
export function againpayorder(data) {
  return request.request({
      url: `api/orderhand/again_pay_order`,
      method: 'POST',
      data: data
  })
}

// 评价商品
export function commentcommodity(data) {
  return request.request({
      url: `api/orderhand/comment_commodity`,
      method: 'POST',
      data: data
  })
}





// 售后订单
export function getsalelist(data) {
  return request.request({
      url: `api/aftersale/get_sale_list`,
      method: 'POST',
      data: data
  })
}

// 售后订单详情
export function getsaleinfo(data) {
  return request.request({
      url: `api/aftersale/get_sale_info`,
      method: 'POST',
      data: data
  })
}

// 商品评论
export function getcommentlist(data) {
  return request.request({
      url: `api/orderhand/get_comment_list`,
      method: 'POST',
      data: data
  })
}

// 退货原因
export function getreasongoods(data) {
  return request.request({
      url: `api/aftersale/get_reason_goods`,
      method: 'POST',
      data: data
  })
}

// 申请退货退款
export function changeaftersale(data) {
  return request.request({
      url: `api/aftersale/change_after_sale`,
      method: 'POST',
      data: data
  })
}

// 售后进度
export function getsalespeed(data) {
  return request.request({
      url: `api/aftersale/get_sale_speed`,
      method: 'POST',
      data: data
  })
}

// 商品列表
export function getcommoditylist(data) {
  return request.request({
      url: `api/index/get_commodity_list`,
      method: 'POST',
      data: data
  })
}


// 积分商品列表
export function getintegralist(data) {
  return request.request({
      url: `api/index/get_integral_list`,
      method: 'POST',
      data: data
  })
}

// 申请经销商
export function applyfordealer(data) {
  return request.request({
      url: `api/userhand/apply_for_dealer`,
      method: 'POST',
      data: data
  })
}

// 员工端
// 登入
export function signin(data) {
  return request.request({
      url: `staff/index/sign_in`,
      method: 'POST',
      data: data
  })
}

// 首页数据
export function getindex(data) {
  return request.request({
      url: `staff/logistics/get_index`,
      method: 'POST',
      data: data
  })
}

// 订单列表
export function getorderlists(data) {
  return request.request({
      url: `staff/logistics/get_order_list`,
      method: 'POST',
      data: data
  })
}

// 我的余额
export function getusermoney(data) {
  return request.request({
      url: `staff/logistics/get_user_money`,
      method: 'POST',
      data: data
  })
}

// 明细列表
export function getdetailedlist(data) {
  return request.request({
      url: `staff/logistics/get_detailed_list`,
      method: 'POST',
      data: data
  })
}


// 开始配送
export function distributionorder(data) {
  return request.request({
      url: `staff/logistics/distribution_order`,
      method: 'POST',
      data: data
  })
}

// 确认送达
export function serviceorder(data) {
  return request.request({
      url: `staff/logistics/service_order`,
      method: 'POST',
      data: data
  })
}

// 修改密码
export function changepwd(data) {
  return request.request({
      url: `staff/logistics/change_pwd`,
      method: 'POST',
      data: data
  })
}

// 修改头像
export function changeheadimg(data) {
  return request.request({
      url: `staff/logistics/change_head_img`,
      method: 'POST',
      data: data
  })
}

// 提现列表
export function getwithdrawallist(data) {
  return request.request({
      url: `staff/logistics/get_withdrawal_list`,
      method: 'POST',
      data: data
  })
}

// 用户提现
export function withdrawal(data) {
  return request.request({
      url: `staff/logistics/withdrawal`,
      method: 'POST',
      data: data
  })
}

// 金币明细列表
export function getgoldlist(data) {
  return request.request({
      url: `api/userhand/get_gold_list`,
      method: 'POST',
      data: data
  })
}

// 金币规则
export function getcoinsrule(data) {
  return request.request({
      url: `api/index/get_coins_rule`,
      method: 'POST',
      data: data
  })
}

// 我的团队
export function getuserteam(data) {
  return request.request({
      url: `api/userhand/get_user_team`,
      method: 'POST',
      data: data
  })
}

// 资金详情
export function getuserinfo(data) {
  return request.request({
      url: `api/userhand/get_user_info`,
      method: 'POST',
      data: data
  })
}

// 可提现佣金金额
export function getmoneylist(data) {
  return request.request({
      url: `api/index/get_money_list`,
      method: 'POST',
      data: data
  })
}

//提现
export function userwithdrawal(data) {
  return request.request({
      url: `api/userhand/user_withdrawal`,
      method: 'POST',
      data: data
  })
}

// 我的积分
export function getmyintegrallist(data) {
  return request.request({
      url: `api/pointsmall/get_my_integral_list`,
      method: 'POST',
      data: data
  })
}

// 删除购物车
export function deleteshopingcart(data) {
  return request.request({
      url: `api/commodityhanld/delete_shoping_cart`,
      method: 'POST',
      data: data
  })
}





































